<%@page import="study.top.mydb.items.Category2Item"%>
<%@page import="java.util.ArrayList"%>
<%@page import="study.top.mydb.Category2"%>
<%@page import="study.top.jsp.WebHandler"%>
<%@ page language="java" contentType="text/xml; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page trimDirectiveWhitespaces="true" %>

<%
	WebHandler web1 = new WebHandler(request, out);
	String seq = web1.getValue("c1seq");
	int c1seq = Integer.parseInt(seq);
	//db.connect();
	Category2 dept2 = new Category2();
	ArrayList<Category2Item> Ca2_list = dept2.selectCategory2List(c1seq);
%>
<?xml version="1.0" encoding="utf-8" ?>
<Category2>
<%
	if (Ca2_list != null) {
		for (int i = 0; i < Ca2_list.size(); i++) {
			Category2Item c2_item = Ca2_list.get(i);
%>
	<option>
		<seq><%=c2_item.getSeq()%></seq>
		<name><%=c2_item.getC2_name()%></name>
	</option>
<%
		}
	}else{
%>
	<option>
		<seq>0</seq>
		<name>---- 선택하세요 ----</name>
	</option>
<%	
	}
%>
</Category2>